//
//  OpHelpView.m
//  LoveBeeProject
//
//  Created by popsicle on 2017/1/4.
//  Copyright © 2017年 斯芬克斯. All rights reserved.
//

#import "OpHelpView.h"

@interface OpHelpView ()

@end

@implementation OpHelpView

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.tableView.tableFooterView = [UIView new];
    //cell分隔线顶头
    self.tableView.separatorInset = UIEdgeInsetsZero;
}

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 2;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    if(indexPath.row == 0)
    {
        UITableViewCell *cell = [[UITableViewCell alloc]init];
        UILabel *helpLabel = [[UILabel alloc]init];
        [cell.contentView addSubview:helpLabel];
        helpLabel.text = @"客服电话:888-8888-888";
        [helpLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(cell.mas_centerY).offset(0);
            make.left.equalTo(cell.mas_left).offset(10);
        }];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        return cell;
    }
    else
    {
        UITableViewCell *cell = [[UITableViewCell alloc]init];
        UILabel *helpLabel = [[UILabel alloc]init];
        [cell.contentView addSubview:helpLabel];
        helpLabel.text = @"在线客服";
        [helpLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(cell.mas_centerY).offset(0);
            make.left.equalTo(cell.mas_left).offset(10);
        }];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        return cell;
    }
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
